package com.shr.netease;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class Main6 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in) ;
		int count = sc.nextInt() ;
		int [][] coor = new int[count][2] ;
		for(int i = 0;i<count;i++){
			coor[i][0] = sc.nextInt() ;
		}
		for(int i = 0;i<count;i++){
			coor[i][1] = sc.nextInt() ;
		}
		int minX = Integer.MAX_VALUE ;
		int minY = Integer.MAX_VALUE ;
		int maxX = Integer.MIN_VALUE;
		int maxY = Integer.MIN_VALUE;
		for(int i = 0;i<coor.length;i++){
			minX = Math.min(minX, coor[i][0]) ;
			maxX = Math.max(maxX, coor[i][0]);
			minY = Math.min(minY, coor[i][1]) ;
			maxY = Math.max(maxY, coor[i][1]);
		}
		int[] minDist = new int [count+1] ;
		for(int i = 1;i<minDist.length;i++)
			minDist[i] = Integer.MAX_VALUE ;
		minDist[1] = 0;
		for(int i = minX;i<=maxX;i++){
			for(int j = minY;j<=maxY;j++){
				int[] curCoor = {i ,j};
				List<Integer> distArray = getDistArray(curCoor, coor);
				Collections.sort(distArray);
				for(int num = 2;num <= count;num++){
					int distSum = 0;
					for(int sta = 0;sta<num;sta++){
						distSum += distArray.get(sta) ;
					}
					minDist[num] = Math.min(minDist[num], distSum);
				}
			}
		}
		
		for(int i = 1;i<minDist.length-1;i++){
			System.out.print(minDist[i]+" ");
		}
		System.out.println(minDist[minDist.length-1]);
		sc.close();
	}

	private static List<Integer> getDistArray(int[] curCoor, int[][] coor) {
		List<Integer> distList = new ArrayList<Integer>();
		for(int i = 0;i<coor.length;i++){
			int dist = Math.abs(coor[i][1] - curCoor[1]) + Math.abs(coor[i][0] - curCoor[0]) ;
			distList.add(dist) ;
		}
		return distList ;
	}
}
